package com.example.forum_system.dao;

import com.example.forum_system.model.Board;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface BoardMapper {
    //1.获取板块列表,[num]限制获取数量
    @Select("select * from t_board order by sort asc limit 0,#{num}")
    List<Board> selectBoardsByNum(@Param("num") int num);

    //2.获取板块,根据板块id
    @Select("select * from t_board where id=#{id} and deleteState=0")
    Board selectOneById(@Param("id") long id);


//    int insert(Board row);
//
//    int insertSelective(Board row);
//
//    Board selectByPrimaryKey(Long id);
//
//    int updateByPrimaryKeySelective(Board row);
//
//    int updateByPrimaryKey(Board row);





}